package com.lxw.oa.mapper;

import com.lxw.oa.entity.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMapper {
    @Select("select role_id from sys_user_role where user_id=#{id}")
    List<Integer> getUserRoleIds(int id);
    @Select("select * from sys_role")
    List<Role> getRoles();

    @Select("select role_name from sys_role where id in ${idStr}")
    List<String> selectNameByIdStr(@Param("idStr")String idStr);
}
